import {post2, post, get} from "../requset";
import request from "../index";

enum API {
    nodeOneUrl = '/localNode/login',
    nodeTwoUrl = '/localNode/msg/',
    nodeThreeUrl = '/localNode/login',
    userCreateUrl = '/localNode/users/create',
    userLoginUrl = '/localNode/users/login'
}

let a = {
    a: 123132
}
export const nodeOne = (data: any) =>
    request.get<any>(API.nodeOneUrl + `?id=12313213`, {params: data})

export const nodeTwo = (data: any) =>
    request.get<any>(API.nodeTwoUrl + data.id, {data: data})

export const nodeThree = (data: any) =>
    request.post<any>(API.nodeThreeUrl, {data: data})

export const userCreate = (data: any) =>
    request.post<any>(API.userCreateUrl, {data: data})

export const userLogin = (data: any) =>
    request.post<any>(API.userLoginUrl, {data: data})

// export const nodeThree2 = (params: any) =>
//     request<any>({
//         url: API.nodeThreeUrl,
//         method: "POST",
//         params: params,
//     })
